home *** CD-ROM | disk | FTP | other *** search
- PXFSETUID(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFSSEETTUUIIDD - Sets user ID
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFSSEETTUUIIDD ((_i_u_i_d,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_u_i_d,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFSSEETTUUIIDD routine uses the sseettuuiidd(2) function to set the real user
- ID, effective user ID, and saved set user IDs of the calling process.
- The following conditions determine the setting of an ID. They are
- checked in the following order, and the first condition that is true
- is applied:
-
- * If the process has appropriate privilege, the real, effective, and
- saved set user IDs are all set to _i_u_i_d.
-
- * If the ID is equal to either the real user ID, the effective user
- ID, or the saved set user, ID is set to _i_u_i_d.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _i_u_i_d An input integer variable used to replace the current user
- ID for the calling process.
-
- _i_e_r_r_o_r An output integer variable that contains zero if PPXXFFSSEETTUUIIDD
- was successful or nonzero if PPXXFFSSEETTUUIIDD was not successful.
-
- This routine may return EEIINNVVAALL if the value of the _i_u_i_d argument is
- out of range. or EEPPEERRMM if the process does not have the appropriate
- privileges and if _i_u_i_d does not match the real user ID.
-
- NNOOTTEESS
- On a UNICOS multilevel security (MLS) system, a process with the
- effective privileges shown is granted the following abilities:
-
- PPrriivviilleeggee DDeessccrriippttiioonn
-
- PPRRIIVV__SSEETTGGIIDD The process may set the real user ID,
- effective user ID, and saved set-user-ID.
-
- On a UNICOS non-MLS system or a UNICOS MLS system with PPRRIIVV__SSUU
- enabled, the super user may set the real user ID, effective user ID,
- and saved set-user-ID.
-
- EEXXAAMMPPLLEESS
- In this example, the current user ID for the current process will be
- obtained by calling PPXXFFGGEETTUUIIDD and then seting the user ID for the
- current process using the group ID returned by PPXXFFGGEETTUUIIDD.
-
- program pxftest
- integer iuid, ierror
-
- CALL PXFGETUID(iuid, ierror)
- if (ierror .eq. 0) then
- CALL PXFSETUID(iuid, ierror)
- if (ierror .eq. 0) then
- print *,'user id set to ',iuid
- else
- print *,'user id not set to ',iuid,' because of error'
- endif
- else
- print *,'could not obtain user ID error = ',ierror
- endif
- end
-
- SSEEEE AALLSSOO
- sseettuuiidd(2)
- PPXXFFGGEETTUUIIDD(3F)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-